<?php
include_once('db.php');
$sql = "select * from indexmessage";
$result = mysqli_query($link,$sql);
$rows = mysqli_fetch_all($result,MYSQLI_ASSOC);
if($rows!=[]&&$rows!=null&&$rows!=""&&$rows!=0){
	$newRow['status'] = 1; // 状态码
	$newRow['msg'] =  "登录成功";
	$newRow['data'] = $rows;
}
echo json_encode($newRow);
?>